#{extends 'webLayout.html' /}
#{set title:'登陆' /}
#{set 'moreScripts'}
<script src="//res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
<script>
    var obj = new WxLogin({
        id:"wxopen_login_qrcode",
        appid: "${wxOpenAppId}",
        scope: "snsapi_login",
        redirect_uri: "${wxOpenRedirectUrl}",
        state: "${wxOpenState}",
        style: "black"
    });
</script>
#{/set}

<div class="am-g  admin-main about">
    <div class="am-u-lg-3 am-u-md-1">&nbsp;</div>
    <div class="am-u-lg-3 am-u-md-5 am-text-center">
        <p>&nbsp;</p>

        <div id="wxopen_login_qrcode" class="bannercon_r right"></div>

    </div>
    <div class="am-u-lg-3 am-u-md-5 am-padding-top am-padding-right">

    #{if flash['needRegister'] != null}
        <div class="whasupply">
            <span>您还没有绑定到企业, 请让同事邀请您; </span>
            <br/>
            <span>或者</span> <a href="@{Application2.register()}">免费开通公司系统</a>
        </div>
    #{/if}
        <p>&nbsp;</p>

        <div class="am-g">
            <h1 class="am-text-center">密码登录</h1>

        #{form @Sessions.create(), class: 'am-form', id:'main-form'}
            <label for="login">邮箱或手机号:</label>
            <input type="text" name="login" id="login"#{if login != null} value="${login}"#{/if} placeholder="使用邮箱或手机号登陆" autofocus>
            <br>
            <label for="password">密码:</label>
            <input type="password" name="password" id="password" placeholder="密码">
            <small class="am-form-help">密码需要微信扫码登陆后, 在【个人资料】中设置</small>
            <br>

            <div class="am-text-center am-text-bottom">
                <input type="submit" id="loginBtn" name="submit" value="登 录" class="am-btn am-btn-lg am-btn-primary">
                <small>忘记密码, 请使用微信扫码登陆</small>
            </div>
        #{/form}
        </div>

    </div>
    <div class="am-u-lg-3 am-u-md-1">&nbsp;</div>
</div>

